{extend name="public/base"/}
{block name="style"}

<link rel="stylesheet" href="__PUBLIC__/plugs/tagsinput/bootstrap-tagsinput.css">
<script src="__PUBLIC__/plugs/tagsinput/bootstrap-tagsinput.js"></script>

<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugs/webuploader/webuploader.css">
<!-- 配置文件 -->
<script type="text/javascript" src="__PUBLIC__/plugs/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__PUBLIC__/plugs/ueditor/ueditor.all.min.js"></script>
<!-- datepicker statr -->
<link href="__PUBLIC__/plugs/datepicker/css/foundation-datepicker.min.css" rel="stylesheet" type="text/css">
<script src="__PUBLIC__/plugs/datepicker/js/foundation-datepicker.js"></script>
<script src="__PUBLIC__/plugs/datepicker/js/foundation-datepicker.zh-CN.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugs/board/board.min.css">
<!-- datepicker end -->
<style>
	hr {
		width:100%;
		margin:0 auto;
		border: 0;
		height: 1px;
		background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
	}
	.board{width:100%;}
	.board-item{float:left;width:24.5%;margin-left:5px;}
</style>
{/block}
{block name="body"}
<div class="main-box clearfix">
	
	<div class="main-box-body clearfix">
		<form method="post" class="form form-horizontal">
			
			<div class="tabs-wrapper">
				<ul class="nav nav-tabs">
					
				</ul>
				<div class="tab-content">
						<div class="form-group">
							<div class="col-lg-12 boards" id="group_sort">

								<div class="board panel panel-info">
									<div class="panel-heading">{$meta_title}（直接拖动进行排序）</div>
									<div class="panel-body">
										<div class="board-list">
											{volist name="chapterlist" id="vo" key="k"}

											<div class="board-item">
												<span data="{$vo.id}">{$vo.chaptername}</span>
												<input type="hidden" name="sort[]" value="{$vo.id}"/>
											</div>
											{if $k%20==0}<hr/>{/if}
											{/volist}

																										</div>
									</div>
								</div>

							</div>
						
						</div>
					
				</div>
			</div>
			<div class="form-group">
				<div class="col-lg-offset-2 col-lg-10">
					<input type="hidden" name="id" value="{$articleid|default=''}">            
					<button class="btn btn-success submit-btn ajax-post" type="submit" target-form="form-horizontal">确 定</button>
					<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__PUBLIC__/plugs/webuploader/webuploader.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/plugs/webuploader/webuploader.custom.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/droppable.js"></script>
<script type="text/javascript" src="__PUBLIC__/plugs/board/board.min.js"></script>
<script type="text/javascript">
$(function(){
	$('.form-group #sort').boards();
	$('.form-group #group_sort').boards({
		drop: function(e){
			e.element.find('input').attr('name','sort[]')
		}
	})
})
</script>
{/block}